package com.jy.rhin.application.cda.enums;

import lombok.Getter;

@Getter
public enum YaoWuSYPLEnum {

    xd("5xd", 5, "次/日"),
    bid("bid", 2, "次/日"),
    biw("biw", 2, "次/周"),
    once("once", 1, "次"),
    prn("prn", 1, "次"),
    q10d("q10d", 1, "次/10日"),
    q12h("q12h", 1, "次/12时"),
    q1h("q1h", 1, "次/时"),
    q2h("q2h", 1, "次/2时"),
    q2w("q2w", 1, "次/2周"),
    q30d("q30d", 1, "次/30日"),
    q30m("q30m", 1, "次/30分钟"),
    q3d("q3d", 1, "次/3日"),
    q3h("q3h", 1, "次/3小时"),
    q3w("q3w", 1, "次/3周"),
    q4d("q4d", 1, "次/4日"),
    q4h("q4h", 1, "次/4小时"),
    q4w("q4w", 1, "次/4周"),
    q5d("q5d", 1, "次/5日"),
    q5h("q5h", 1, "次/5小时"),
    q6d("q6d", 1, "次/6日"),
    q6h("q6h", 1, "次/6小时"),
    q72h("q72h", 1, "次/72小时"),
    q8h("q8h", 1, "次/8小时"),
    qd("qd", 1, "次/日"),
    qid("qid", 4, "次/日"),
    qm("qm", 1, "次/日中午"),
    qn("qn", 1, "次/晚"),
    qod("qod", 1, "次/隔日"),
    qon("qon", 1, "次/2晚"),
    qw("qw", 1, "次/周"),
    st("st", 1, "次"),
    tid("tid", 3, "次/日"),
    tiw("tiw", 3, "次/周"),
    ;

    private String name;
    private Integer value;
    private String unit;

    YaoWuSYPLEnum(String name, Integer value, String unit) {
        this.name = name;
        this.value = value;
        this.unit = unit;
    }

    public static YaoWuSYPLEnum getYaoWuSYPLEnum(String name) {
        for (YaoWuSYPLEnum temp : YaoWuSYPLEnum.values()) {
            if (name.equals(temp.name)) {
                return temp;
            }
        }
        return YaoWuSYPLEnum.once;
    }

}
